//
//  TYAttributedLabel+RAC.h
//  高仿暴走斗图
//
//  Created by key on 16/4/20.
//  Copyright © 2016年 huangsongyao. All rights reserved.
//

#import <TYAttributedLabel/TYAttributedLabel.h>
#import "NSObject+TY.h"

@interface TYAttributedLabel (RAC)

@property (nonatomic, strong, readonly) RACSubject *subject;

/**
 *  rac_创建TY画布
 *
 *  @param parentView       添加的父类
 *  @param delegate         委托
 *  @param text             文本内容
 *  @param characterSpacing 字间距离
 *  @param linesSpacing     行间距离
 *  @param textColor        字体颜色
 *  @param font             字体大小
 *
 *  @return rac 的signal信号，混排view后的signal信号
 */
+ (RACSignal *)createArrtibutedLabelShowInParentView:(UIView *)parentView
                                         andDelegate:(id<TYAttributedLabelDelegate>)delegate
                                                text:(NSString *)text
                                    characterSpacing:(unichar)characterSpacing
                                        linesSpacing:(CGFloat)linesSpacing
                                           textColor:(UIColor *)textColor
                                                font:(UIFont *)font;


/**
 *  rac_创建TY画布
 *
 *  @param delegate         委托
 *  @param text             文本内容
 *  @param characterSpacing 字间距离
 *  @param linesSpacing     行间距离
 *  @param textColor        字体颜色
 *  @param font             字体大小
 *
 *  @return 画布实例
 */
+ (TYAttributedLabel *)createArrtibutedLabelForDelegate:(id<TYAttributedLabelDelegate>)delegate
                                                   text:(NSString *)text
                                       characterSpacing:(unichar)characterSpacing
                                           linesSpacing:(CGFloat)linesSpacing
                                              textColor:(UIColor *)textColor
                                                   font:(UIFont *)font;
@end
